package com.woniuxy.income.web.controller;


import com.woniuxy.core.model.Result;
import com.woniuxy.income.service.CentifiedIncomeService;
import com.woniuxy.income.service.PlatformIncomeService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 凌玉春
 * @since 2024年01月15日
 */
@RestController
@RequestMapping("/platformIncome")
public class PlatformIncomeController {
    @Autowired
    private CentifiedIncomeService centifiedIncomeService;
    @Autowired
    private PlatformIncomeService platformIncomeService;

    @ApiOperation("平台查看今日营业收入")
    @GetMapping("/platGetTodayInCome")
    public Result<String> platGetTodayInCome(){
        String inCome=centifiedIncomeService.platGetTodayInCome();
        return Result.getResult(String.class).setMessage("平台查看今日营业收入成功").setData(inCome);
    }

    @ApiOperation("平台查看本月营业收入")
    @GetMapping("/platGetMonthInCome")
    public Result<String> platGetMonthInCome(){
        String inCome=platformIncomeService.platGetMonthInCome();

        return Result.getResult(String.class).setMessage("平台查看本月营业收入成功").setData(inCome);
    }

}

